package com.navi.util;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.sql.Connection;
import java.sql.SQLException;

/**
 * Created by admin on 2017/10/26.
 */
@Component
public class TestConnectionUtil {
    @Value("${gp.datasource.drive}")
    private String driver;
    @Value("${gp.datasource.url}")
    private String url;
    @Value("${gp.datasource.username}")
    private String username;
    @Value("${gp.datasource.password}")
    private String password;

    public Connection getDefaultConnection() throws SQLException, ClassNotFoundException {
        return TableJdbcUtil.getConnection(driver, url, username, password);
    }


}
